var pear_request_str = `GET /hello HTTP/1.1\r\n`+
     `Host: localhost\r\n`+
     `Connection: keep-alive\r\n`+
     `Pragma: no-cache\r\n`+
     `Cache-Control: no-cache\r\n`+
     `Upgrade-Insecure-Requests: 1\r\n`+
     `User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/53.0.2785.143 Chrome/53.0.2785.143 Safari/537.3\r\n`+
     `Accept: application/octet-stream;q=0.9,image/webp,*/*;q=0.8\r\n`+
     //`Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\r\n`+
     `Accept-Encoding: gzip, deflate, sdch\r\n`+
     `Accept-Language: en-US,en;q=0.8\r\n`+
     `\r\n`;


function pear_request()
{
  //console.log(pear_request_str);
  Janus.log("begin send message");
  textroom.data({
	text: pear_request_str,
	error: function(reason) { bootbox.alert(reason); },
	success: function() { $('#datasend').val(''); }
    });
}
function pear_response_handle(response)
{
   console.log("response type is : "+typeof response);
   var content=response.split(`\r\n\r\n`)[1]; 
   console.log("content is : " + content);
}